﻿using System;
using System.Reflection;

namespace Math
{
    class Program
    {
        static void Main(string[] args)
        {
            string filename = @"D:\Visual Studio\工作区\作业\第一题\bin\Debug\net5.0\Math.dll";
            Assembly asm = Assembly.LoadFrom(filename);
            Type[] tes = asm.GetTypes();
            Type t1 = asm.GetType(tes[0].FullName);

            for (int i = 0; i < 4; i++)
            {
                MethodInfo method = t1.GetMethod(t1.GetMethods()[i].Name);
                object obj = Activator.CreateInstance(t1);
                Console.WriteLine(t1.GetMethods()[i].Name + " " + method.Invoke(obj, new object[] { 32, 69 }));
            }
            Console.ReadLine();
        }
    }
}